package cn.edu.scau.cmi.chenbingquan.composite.safe;

// 安全组合模式叶子节点
public class SafeLeaf extends SafeComponent {
	
	public SafeLeaf(String name) {
		this.name = name;
	}
	
	// Treeitem显示的是节点的toString方法的返回值
	@Override
	public String toString() {
		return "个人：" + this.name;
	}
		
	// 访问器与修改器
	public void setName(String name) {
		this.name = name;
	}
	
	public String getName() {
		return this.name;
	}
}
